package com.xxy.springcloud.controller;

import com.xxy.springcloud.service.PaymentService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @program: cloud2021
 * @description:
 * @author: 小小鱼
 * @date: 2021-03-11 21:15
 **/
@RestController
public class PaymentController {

    @Resource
    private PaymentService paymentService;


    @GetMapping("payment/hystrix/ok/{id}")
    public String paymentInfo_Ok(@PathVariable Integer id){
        return paymentService.paymentInfo_Ok(id);
    }

    @GetMapping("payment/hystrix/timeout/{id}")
    public String paymentInfo_TimeOut(@PathVariable Integer id){
       return paymentService.paymentInfo_TimeOut(id);
    }

}
